package com.iretailer.report.easyexcel.data;

import com.alibaba.excel.annotation.ExcelProperty;
import com.iretailer.report.util.TimeUtil;
import lombok.Data;

import java.time.LocalDate;
/**
 * @Auther Bennie
 * @Date 2020/6/15 10:23
 * @Description
 */
@Data
public class CompanyData {
    @ExcelProperty(index = 10)
    private String companyCode;

    @ExcelProperty(index = 11)
    private String companyName;

    @ExcelProperty(index = 12)
    private String mallCode;

    @ExcelProperty(index = 13)
    private String mallName;

    @ExcelProperty(index = 16)
    private String startDate;

    @ExcelProperty(index = 17)
    private String endDate;

    public LocalDate getContractStartDate() {
        String date = this.startDate.replaceAll("" +
                "","").replaceAll("/","");
        return TimeUtil.parse_LocalDate(date,"yyyyMMdd");
    }

    public LocalDate getContractEndDate() {
        String date = this.endDate.replaceAll("-","").replaceAll("/","");
        return TimeUtil.parse_LocalDate(date,"yyyyMMdd");
    }


}
